#include <stdio.h>
#include <stdlib.h>
#include "LinkList.h"
void main()
{
    LinkList list;
    InitLinkList(&list);
    for(int i=1;i<=10;i++)
    {
        InsertHead(&list,i);
    }
    InsertHead(&list,2);
    InsertHead(&list,2);
    InsertIndex(&list,10,10);
    Travel(&list);
    // RemoveByindex(&list,2);
    // Travel(&list);
    RemoveIByElement(&list,10);
    Travel(&list);
    // int *find=FindByIndex(&list,2);
    // if(find!=NULL)
    // {
    //     printf("%d\n",*find);
    // }
    int *p=FindByElement(&list,2);
    int *p1=p;
    while(*p1!=-1)
    {
        printf("%d ",*p1);
        p1++;
    }
    printf("\n");
    free(p);
    SetValueByIndex(&list,10,10);
    Travel(&list);
    SetValueByElement(&list,2,11);
    InsertHead(&list,0);
    BubbleSort(&list);
    Travel(&list);
    Node *nerwhead=Reserve2(list.head);
    list.head=nerwhead;
    Reserve(&list);
    
    Travel(&list);
    FreeLinkList(&list);
}